From: Matthieu Gallien Date: Fri, 3 Jan 2025 14:34:07 +0000 (+0100) Subject: prevent implicit hydration when checking PIN state X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~2^2~156^2 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=6f8a40f73e8f965da5a6e8771fdbfd96cf3f8537;p=nextcloud-desktop.git prevent implicit hydration when checking PIN state to enable move to trash, we check availability of a folder recursively that will trigger implicit hydration of its content we will now prevent moving to trash for VFS CfApi native VFS on Windows will fix teh bug and probably be much more robust and reliable Signed-off-by: Matthieu Gallien --- diff --git a/src/libsync/propagatorjobs.cpp b/src/libsync/propagatorjobs.cpp index 6d1bb1b6f..99e69719d 100644 --- a/src/libsync/propagatorjobs.cpp +++ b/src/libsync/propagatorjobs.cpp @@ -118,7 +118,7 @@ void PropagateLocalRemove::start() QString removeError; const auto availability = propagator()->syncOptions()._vfs->availability(_item->_file, Vfs::AvailabilityRecursivity::RecursiveAvailability); - if (_moveToTrash && (!availability || (*availability != VfsItemAvailability::AllDehydrated && *availability != VfsItemAvailability::OnlineOnly && *availability != VfsItemAvailability::Mixed))) { + if (_moveToTrash && propagator()->syncOptions()._vfs->mode() != OCC::Vfs::WindowsCfApi) { if ((QDir(filename).exists() || FileSystem::fileExists(filename)) && !FileSystem::moveToTrash(filename, &removeError)) { done(SyncFileItem::NormalError, removeError, ErrorCategory::GenericError);